/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.baatar.opt.genetic.set.covering.binary;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.BitSet;
import org.baatar.opt.genetic.chromosome.IChromosome;
import org.baatar.opt.genetic.chromosome.IChromosomeFactory;
import org.baatar.opt.genetic.set.meta.Column;
import org.baatar.opt.genetic.set.meta.DataSet;
import org.baatar.opt.genetic.set.meta.Row;

/**
 *
 * @author Ba
 */
public class SCChromosomeFactory implements IChromosomeFactory<Boolean, BitSet> {

    private DataSet dataSet = null;

    public SCChromosomeFactory(DataSet dataSet) {
        this.dataSet = dataSet;
    }

    @Override
    public IChromosome<Boolean, BitSet> createChromosome() {
        return new SCChromosome(dataSet);
    }

    @Override
    public int getChromosomeLength() {
        return dataSet.columns.length;
    }

    @Override
    public void init() {
        dataSet.init();
    }

    /**
     * Clones the this object.
     * 
     * @return Object new cloned object.
     * 
     * @throws CloneNotSupportedException is trown if this object doesnt
     * implements Cloneable interface.
     */
    @Override
    public Object clone() throws CloneNotSupportedException {
        return super.clone();
    }
}
